-
Notifications
You must be signed in to change notification settings - Fork 619
Shorten publisher address in OG image on published contract page #5242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shorten publisher address in OG image on published contract page #5242
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5242 +/- ##
=======================================
Coverage 45.29% 45.29%
=======================================
Files 1068 1068
Lines 55380 55380
Branches 3975 3975
=======================================
Hits 25082 25082
Misses 29606 29606
Partials 692 692
*This pull request uses carry forward flags. Click here to find out more. |
size-limit report 📦
|
Merge activity
|
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR enhances the `publishedContractOGImageTemplate` function to conditionally shorten the display of the `publisher` address if it is a valid blockchain address.
### Detailed summary
- Added import for `isAddress` and `shortenAddress` from `thirdweb`.
- Updated the rendering of the `publisher` in the `<h2>` element to check if it is a valid address using `isAddress`.
- If valid, it displays the shortened address using `shortenAddress`; otherwise, it displays the full `publisher` name.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
85649c2 to
09b1912
Compare
Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR enhances the
publishedContractOGImageTemplatefunction by adding address validation and shortening for the publisher's address in the Open Graph image template.Detailed summary
isAddressandshortenAddressfromthirdweb.params.publisherto check if it is a valid address.